from odoo import api, models, fields
from odoo.tools import date_utils


class nbd_duediligence(models.Model):
    _name = 'nbd.duediligence'
    _description = '尽职调查'

    due_diligence_starttime = fields.Char(string='开始时间', max_length=20)
    due_diligence_endtime = fields.Char(string='结束时间', max_length=20)
    Due_diligence_users = fields.Char(string='参与用户', max_length=20)
    file_type = fields.Char(string='文件类型', max_length=20)

    file_ids = fields.One2many(
        comodel_name='nbd.filemanager',
        inverse_name='id',
        domain=lambda self: [('res_model', '=', self._name)],
        string='附件'
    )
    task_id = fields.Many2one(
        comodel_name='project.task',
        string='taskid'
    )